Optimal. Leaf size=87 \[ \frac {x^n}{c n}-\frac {\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{c^2 \sqrt {b^2-4 a c} n}-\frac {b \log \left (a+b x^n+c x^{2 n}\right )}{2 c^2 n} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.05, antiderivative size = 87, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 6, integrand size = 24, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {1371, 717, 648,
632, 212, 642} \begin {gather*} -\frac {\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{c^2 n \sqrt {b^2-4 a c}}-\frac {b \log \left (a+b x^n+c x^{2 n}\right )}{2 c^2 n}+\frac {x^n}{c n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 212
Rule 632
Rule 642
Rule 648
Rule 717
Rule 1371
Rubi steps
\begin {align*} \int \frac {x^{-1+3 n}}{a+b x^n+c x^{2 n}} \, dx &=\frac {\text {Subst}\left (\int \frac {x^2}{a+b x+c x^2} \, dx,x,x^n\right )}{n}\\ &=\frac {x^n}{c n}+\frac {\text {Subst}\left (\int \frac {-a-b x}{a+b x+c x^2} \, dx,x,x^n\right )}{c n}\\ &=\frac {x^n}{c n}-\frac {b \text {Subst}\left (\int \frac {b+2 c x}{a+b x+c x^2} \, dx,x,x^n\right )}{2 c^2 n}+\frac {\left (b^2-2 a c\right ) \text {Subst}\left (\int \frac {1}{a+b x+c x^2} \, dx,x,x^n\right )}{2 c^2 n}\\ &=\frac {x^n}{c n}-\frac {b \log \left (a+b x^n+c x^{2 n}\right )}{2 c^2 n}-\frac {\left (b^2-2 a c\right ) \text {Subst}\left (\int \frac {1}{b^2-4 a c-x^2} \, dx,x,b+2 c x^n\right )}{c^2 n}\\ &=\frac {x^n}{c n}-\frac {\left (b^2-2 a c\right ) \tanh ^{-1}\left (\frac {b+2 c x^n}{\sqrt {b^2-4 a c}}\right )}{c^2 \sqrt {b^2-4 a c} n}-\frac {b \log \left (a+b x^n+c x^{2 n}\right )}{2 c^2 n}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 82, normalized size = 0.94 \begin {gather*} \frac {2 c x^n+\frac {2 \left (b^2-2 a c\right ) \tan ^{-1}\left (\frac {b+2 c x^n}{\sqrt {-b^2+4 a c}}\right )}{\sqrt {-b^2+4 a c}}-b \log \left (a+x^n \left (b+c x^n\right )\right )}{2 c^2 n} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(663\) vs.
\(2(81)=162\).
time = 0.09, size = 664, normalized size = 7.63
method | result | size |
risch | \(-\frac {b \ln \left (x \right )}{c^{2}}+\frac {x^{n}}{c n}+\frac {4 n^{2} \ln \left (x \right ) a b c}{4 a \,c^{3} n^{2}-b^{2} c^{2} n^{2}}-\frac {n^{2} \ln \left (x \right ) b^{3}}{4 a \,c^{3} n^{2}-b^{2} c^{2} n^{2}}-\frac {2 \ln \left (x^{n}-\frac {-2 a b c +b^{3}+\sqrt {-16 a^{3} c^{3}+20 a^{2} b^{2} c^{2}-8 a \,b^{4} c +b^{6}}}{2 c \left (2 a c -b^{2}\right )}\right ) a b}{\left (4 a c -b^{2}\right ) c n}+\frac {\ln \left (x^{n}-\frac {-2 a b c +b^{3}+\sqrt {-16 a^{3} c^{3}+20 a^{2} b^{2} c^{2}-8 a \,b^{4} c +b^{6}}}{2 c \left (2 a c -b^{2}\right )}\right ) b^{3}}{2 \left (4 a c -b^{2}\right ) c^{2} n}+\frac {\ln \left (x^{n}-\frac {-2 a b c +b^{3}+\sqrt {-16 a^{3} c^{3}+20 a^{2} b^{2} c^{2}-8 a \,b^{4} c +b^{6}}}{2 c \left (2 a c -b^{2}\right )}\right ) \sqrt {-16 a^{3} c^{3}+20 a^{2} b^{2} c^{2}-8 a \,b^{4} c +b^{6}}}{2 \left (4 a c -b^{2}\right ) c^{2} n}-\frac {2 \ln \left (x^{n}+\frac {2 a b c -b^{3}+\sqrt {-16 a^{3} c^{3}+20 a^{2} b^{2} c^{2}-8 a \,b^{4} c +b^{6}}}{2 c \left (2 a c -b^{2}\right )}\right ) a b}{\left (4 a c -b^{2}\right ) c n}+\frac {\ln \left (x^{n}+\frac {2 a b c -b^{3}+\sqrt {-16 a^{3} c^{3}+20 a^{2} b^{2} c^{2}-8 a \,b^{4} c +b^{6}}}{2 c \left (2 a c -b^{2}\right )}\right ) b^{3}}{2 \left (4 a c -b^{2}\right ) c^{2} n}-\frac {\ln \left (x^{n}+\frac {2 a b c -b^{3}+\sqrt {-16 a^{3} c^{3}+20 a^{2} b^{2} c^{2}-8 a \,b^{4} c +b^{6}}}{2 c \left (2 a c -b^{2}\right )}\right ) \sqrt {-16 a^{3} c^{3}+20 a^{2} b^{2} c^{2}-8 a \,b^{4} c +b^{6}}}{2 \left (4 a c -b^{2}\right ) c^{2} n}\) | \(664\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.39, size = 285, normalized size = 3.28 \begin {gather*} \left [-\frac {{\left (b^{2} - 2 \, a c\right )} \sqrt {b^{2} - 4 \, a c} \log \left (\frac {2 \, c^{2} x^{2 \, n} + b^{2} - 2 \, a c + 2 \, {\left (b c + \sqrt {b^{2} - 4 \, a c} c\right )} x^{n} + \sqrt {b^{2} - 4 \, a c} b}{c x^{2 \, n} + b x^{n} + a}\right ) - 2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} x^{n} + {\left (b^{3} - 4 \, a b c\right )} \log \left (c x^{2 \, n} + b x^{n} + a\right )}{2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} n}, -\frac {2 \, {\left (b^{2} - 2 \, a c\right )} \sqrt {-b^{2} + 4 \, a c} \arctan \left (-\frac {2 \, \sqrt {-b^{2} + 4 \, a c} c x^{n} + \sqrt {-b^{2} + 4 \, a c} b}{b^{2} - 4 \, a c}\right ) - 2 \, {\left (b^{2} c - 4 \, a c^{2}\right )} x^{n} + {\left (b^{3} - 4 \, a b c\right )} \log \left (c x^{2 \, n} + b x^{n} + a\right )}{2 \, {\left (b^{2} c^{2} - 4 \, a c^{3}\right )} n}\right ] \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {x^{3\,n-1}}{a+b\,x^n+c\,x^{2\,n}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________